package com.dwxt.mall.admin.service;

import com.dwxt.mall.dao.CustomerServiceMapper;
import com.dwxt.mall.entity.CustomerService;
import com.dwxt.mall.entity.CustomerServiceExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerServiceAdmin {

    @Autowired
    private CustomerServiceMapper customerServiceMapper;

    public List<CustomerService> selectAllCustomer() {
        CustomerServiceExample example = new CustomerServiceExample();
        example.setOrderByClause("create_time desc");
        return customerServiceMapper.selectByExample(example);
    }

    public void updateByPrimaryKey(CustomerService customerService) {
        customerServiceMapper.updateByPrimaryKeySelective(customerService);
    }
}
